﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="adminTemp.aspx.cs" Inherits="Admin_adminTemp" %>

<%@ Register Src="adminfoot.ascx" TagName="adminfoot" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <link rel="stylesheet" href="imgs/admin.css" type="text/css" media="all" />
    <script type="text/javascript" src="../DotNet_net/js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="imgs/GetAjax.js"></script>
    <script type="text/javascript" src="../DotNet_net/js/common.js"></script>
</head>
<body onload="$('#loading').hide()">
    <form id="form1" runat="server">
<div class="container" id="cpcontainer">
<div id="loading" style="display:block">   
    <div class="loading-indicator">   
        页面正在加载中...   
    </div>   
</div> 
<table class="tb">
<tr class="thead"><th colspan="15">
    临时表管理(产品数据:此页面的产品是你设置了屏蔽的，在此页面整合，方便管理)</th></tr>	
  <tr bgcolor="#f5fafe">
	<td style="width: 5%">ID<a href="#"><img src="imgs/minus.gif" title="按ID排序" /></a></td>
	<td style="width: 15%"> 产品名称</td>
	<td style="width: 10%">
        别名(Tag)<a href="#"><img src="imgs/minus.gif" title="按人气排序" /></a></td>
        <td style="width: 10%">数据类别</td>
	<td style="width: 5%">
        排序</td>
		<td style="width: 5%">
        浏览次数</td>
	<td style="width: 10%">时间<a href="#"><img src="imgs/minus.gif" title="按时间排序" /></a></td>

	<td style="width: 50%" align="left">屏蔽</td>
  </tr>
  
      <asp:Repeater ID="Repeater1" runat="server">
      <ItemTemplate>
<tr bgcolor="#f5fafe" lang='<%=num++ %>'>
	<td ><input type="checkbox" value='<%#Eval("productid") %>' name="m_id"   class="checkbox" /><%#Eval("productid") %></td>
	<td style="width: 179px"><a  href='../ProductDetails.aspx?CurrentIndex=-1&productid=<%#Eval("productid") %>' target="_blank"><%#Eval("productname") %></a><span id="state1"><img src="imgs/icon_01.gif"   style="cursor:pointer"  /></span></td>
	<td><%#Eval("ptag") %></td>
	<td>
        <span style="color: #2366a8"><%#chooseProductByClassId(Convert.ToInt32(Eval("pclassid")))%></span></td>
	<td>
        <input name='psort<%#Eval("productId") %>' size="3" type="text"   value='<%#Eval("pSort") %>'/></td>
	<td><span><span style='color:red;font-size:10px'><input name='pview<%#Eval("productId") %>' size="3" type="text" value='<%#Eval("views") %>' /></span></span></td>
   <td align="left">
       <span style="font-size: 7pt; color: #ff0000"><%#Eval("edate","{0:d}") %></span></td>
	<td style="width: 600px">
	  <input id='can<%#Eval("productId") %>' type="button" value='<%#Convert.ToInt32(Eval("isCan"))==0?"屏蔽":"已屏蔽" %>' class='btn' name='isCan<%#Eval("productId") %>' title='<%#Eval("isCan") %>' onclick='doGetIsBool("",this,"can","屏蔽")'  lang='<%#Eval("productId") %>'/>	
	<input id="btnDel" type="button" value="删除" class='btn' title='<%#Eval("productId") %>' onclick="if(confirm('确定要删除吗')){ajax_get('?action=delAll&id='+this.title+$('#HiddenUrl').attr('value'),'',function(msg){$('#cpcontainer').empty().append(msg);});}else{return false}"/>   
	</td>
  </tr>
        
      </ItemTemplate>
      </asp:Repeater>
      <tr><td colspan="11" style="height: 45px"><div class="cuspages"><div class="pages" id="pro"><div style="width:90%; float:left;">全选<input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll(this.checked,'m_id')" />反选<input type="checkbox" name="chkothers" id="chkothers" class="checkbox" onclick="checkOthers('m_id')" /></div>
<div style="float:right; width:10%; text-align: center;"><input type="button" value="批量删除" onclick="doPostDeletes('','m_id')" class="btn"  style="color:Red"; /></div>
</div></div></td>
</tr>
<tr><td colspan="11"><div class="cuspages"><div class="pages">
<%htmlPaging(); %><%--<a href="?page=1&order=m_addtime&type=&keyword=&m_state=&m_commend=&repeat=&topic=&playfrom=">首页</a> <a href="?page=0&order=m_addtime&type=&keyword=&m_state=&m_commend=&repeat=&topic=&playfrom=">上一页</a> 
<span><a href="#">1</a></span>
<a href="?page=2&order=m_addtime&type=&keyword=&m_state=&m_commend=&repeat=&topic=&playfrom=">下一页</a> <a href="?page=1&order=m_addtime&type=&keyword=&m_state=&m_commend=&repeat=&topic=&playfrom=">尾页</a>--%>
    &nbsp;</div></div></td>
</tr>
</table>
<%=input%>
 <uc1:adminfoot ID="Adminfoot1" runat="server" />
</div>
      
<%--删除,移动,修改start--%>
<script type="text/javascript" >
  function  doPostDeletes(url,sname)
  {    
       
        var ids=getIDList(sname);
        if(ids!="")
        {
            if((confirm("确定要删除这些记录?"))==true)
            { $("#loading").show();
                url=convertURL(url+"?action=delAll&id="+ids+$("#HiddenUrl").attr("value"));                  
                ajax_get(url,'',function(msg)
                {
                   $("#cpcontainer").empty().append(msg);
                   $("#loading").hide();
                });
	        }
	    }
	    else
	    {
	        alert("您还没有选择要删除的项");	    
	        return false;
	    }
  }
  function doGetIsBool(url,em,type,name)
  {
      url=convertURL("?action="+type+"&bo="+em.title+"&id="+em.lang+$("#HiddenUrl").attr("value"));
      ajax_get(url,'',function(msg)
      {
        if(msg==name)
        {
            $("#"+em.id).attr("value",name);
            $("#"+em.id).attr("title","false");
   
        }
        else
        {
             $("#"+em.id).attr("value","已"+name);
             $("#"+em.id).attr("title","true");

        }
      });
  }
 </script>
<%--删除,移动,修改end--%>
    <script type="text/javascript" >
    function changePage(name)
    {

    }
    </script>
     

    </form>
</body>
</html>
